package com.mlf.singleton.singleton.spring;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyConfig {
    @Bean
    // 默认就是 @Scope("singleton")
    public MyService myService() {
//        System.out.println("注入myservice");
        return new MyServiceImpl();
    }
}
